﻿using System;
using System . Collections . Generic;
using System . IO;
using System . Linq;
using System . Runtime . InteropServices . WindowsRuntime;
using Windows . Foundation;
using Windows . Foundation . Collections;
using Windows . UI . Xaml;
using Windows . UI . Xaml . Controls;
using Windows . UI . Xaml . Controls . Primitives;
using Windows . UI . Xaml . Data;
using Windows . UI . Xaml . Input;
using Windows . UI . Xaml . Media;
using Windows . UI . Xaml . Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkID=390556

namespace RichMan4LApp
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class AboutPage : Page
    {
        public AboutPage ( )
        {
            this . InitializeComponent ( );
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo ( NavigationEventArgs e )
        {
        }
        private void Page_Loaded ( object sender , RoutedEventArgs e )
        {
            StartStoryBoard . Begin ( );
        }


        private void TextBlock_Tapped ( object sender , TappedRoutedEventArgs e )
        {

        }

        private void PressHereTextBlock_Tapped ( object sender , TappedRoutedEventArgs e )
        {
            EasyPage . Navigate ( typeof ( HidePage ) , null , "Purple" , LeaveStoryBoard , BackGroundRect , Frame , RemoveControl , AddControl );
        }

        private void SettingPageButton_Click ( object sender , RoutedEventArgs e )
        {
            EasyPage . Navigate ( typeof ( SettingPage ) , null , "DeepRed" , LeaveStoryBoard , BackGroundRect , Frame,RemoveControl,AddControl );
        }

        private void RemoveControl ( )
        {
            PressHereTextBlock . Tapped -= PressHereTextBlock_Tapped;
            SettingPageButton . Click -= SettingPageButton_Click;
        }

        private void AddControl ( )
        {
            PressHereTextBlock . Tapped += PressHereTextBlock_Tapped;
            SettingPageButton . Click += SettingPageButton_Click;
        }
    }

}
